# 导包
'''import requests
import config
# 创建接口类
class StaffAPI:
    # 添加员工
    def insert_staff(self, add_data, token):
        url = config.BASE_URL + "/api/sys/user"
        return requests.post(url=url, json=add_data, headers={"Authorization": token})
    # 修改员工
    def update_staff(self, staff_id, update_data, token):
        url = config.BASE_URL + "/api/sys/user/{}".format(staff_id)
        return requests.put(url=url, json=update_data, headers={"Authorization": token})
    # 查询员工
    def select_staff(self, staff_id, token):
        url = config.BASE_URL + "/api/sys/user/{}".format(staff_id)
        return requests.get(url=url, headers={"Authorization": token})
    # 删除员工
    def delete_staff(self, staff_id, token):
        url = config.BASE_URL + "/api/sys/user/{}".format(staff_id)
        return requests.delete(url=url, headers={"Authorization": token})'''
import requests
import config
class StaffAPI:
    def insert_staff(self,add_data,token):
        url=config.BASE_URL + "/api/sys/user"
        return requests.post(url=url,json=add_data,headers={"Authorization":"token"})
    def select_staff(self,staff_id,token):
        url=config.BASE_URL+"/api/sys/user/{}".format(staff_id)
        return requests.get(url=url,headers={"Authorization":"token"})
    def update_staff(self,staff_id,update_data,token):
        url=config.BASE_URL+ "/api/sys/user/{}".format(staff_id)
        return requests.put(url=url,json=update_data,headers={"Authorization":"token"})
    def delete_staff(self,staff_id,token):
        url = config.BASE_URL+ "/api/sys/user/{}".format(staff_id)
        return requests.delete(url=url,headers={"Authorization":"token"})
